<%--
 *  File:    HospitalEdit.jsp
 *  @Author: Jamesli 
 *  Date:    2010/06/30
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
 
<%
  //init param
  Category cat = Category.getInstance("jsp.HospitalEdit");
  String strModuleName = "ERM";
  String privilegeCode = "10320,10902";
  String contextPath = request.getContextPath();
%>
<% //--------------------  include files list --%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>HospitalEdit</title>
<PageFlow:CheckPageFlow pageName="p_hospitaldetail"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>
<%@ include file ="/inc/NewCalendar.inc" %>
<%
String strDisplayFlag="";
if(request.getParameter("displayflag")!=null)
{
  strDisplayFlag=request.getParameter("displayflag");
}
String isEdit="";
if(request.getParameter("hospitalid")!=null)
{
  isEdit="edit";
}
%>
<script language="JavaScript">
function page_save()
{ 
  if(!checkForm(document.cform))
    return;
  var zipcode=document.cform.zipcode.value;
  if(zipcode==null || zipcode!=""){
    if(zipcode.length!=6){
     alert("请输入六位数字的邮编");
     return;
      }	
    }
  var hospitalid = document.cform.hospitalid.value;
  if(hospitalid == null || hospitalid == ""){
  	document.cform.actionname.value = "add";
  }else{
  	document.cform.actionname.value = "modify"; 
  }
  document.cform.target = "_self";
  //isRunning = true;
  <%if(!(isEdit).equals("edit")){%>					
  setTimeout("__clickedTab(document.getElementById('attributeTab'),'/oval/zyl/masterdata/erm/ZylMasterdataRelationship.jsp?globalpccode=113');","800");
  <%} %>
  emptyToNull(document.cform);
  __submitData("pageform",true);
}


var popwindow;

function page_setRegion(code,name)
{
  if(code != document.cform.regioncode.value)
  {
    document.cform.citycode.value = " ";
    document.cform.cityname.value = " ";
    document.cform.countycode.value = " ";
    document.cform.countyname.value = " ";
  }
  document.cform.regioncode.value = code;
  document.cform.regionname.value = name;
  if (popwindow != null)
    popwindow.close();
}

function page_selectProvince()
{
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open('<%=contextPath %>/masterdata/ogm/RegionSelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN','newwindow', 'height=250, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
}

function page_selectCity(flag,grade)
{
  var regioncode = document.cform.regioncode.value;
  var parentcitycode = document.cform.citycode.value;
  if(flag=="city"){
   if(isEmpty(regioncode))
   {
     alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_Province"))%>");
     return;
   }
  }
  if(flag=="county"){
   if(isEmpty(parentcitycode))
   {
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_City"))%>");
    return;
   }
  }
  var url='<%=contextPath %>/masterdata/ogm/CitySelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&regioncode=' + regioncode + '&flag=' + flag+'&grade='+grade;
  if(flag=="county"){
   url=url+'&parentcitycode='+parentcitycode;
  }
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open(url,'newwindow', 'height=250, width=400,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

function page_setCity(code,name,id,flag)
{
	if(flag == "county"){
		document.cform.countycode.value = code;
		document.cform.countyname.value = name;
	}else {
		document.cform.citycode.value = code;
		document.cform.cityname.value = name;
		document.cform.countycode.value = " ";
    	document.cform.countyname.value = " ";
	}
  if (popwindow != null)
    popwindow.close();
}

function page_setOrg(id,name,code)
{
  document.cform.parentorgid.value = id;
  document.cform.parentorgcode.value = code;  
  document.cform.parentorgname.value = name;
  var remote = window.open("","newwindow");
  if (remote != null)
    remote.close();
}

function page_selectPurchase() {
	hospitalid = document.cform.hospitalid.value;
	if(hospitalid==""){
		alert("请先保存其他信息！")
		return;
	}
	var status = "height=400, width=330,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no";
	var url = "<%=contextPath %>/zyl/masterdata/erm/PurchaseChannel.jsp?<%= OvalTools.randomURL() %>&hospitalid=" + hospitalid +"&displayflag=" + "<%= strDisplayFlag%>";
	if (typeof popwindow1 != 'undefined') popwindow1.close();
	popwindow1 = window.open(url, "newwindow1", status);
}


function setBusinessarea(id,areaname){
	document.cform.businessareaid.value=id;
	document.cform.areaname.value=areaname;
	
}

function popBusinessarea(){
	if(popwindow!=null) popwindow.close();
    url = '<%=contextPath %>/zyl/masterdata/erm/BusinessAreaPop.jsp?<%= OvalTools.randomURL() %>';
    attribute = 'height=500, width=250,top=100,left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no';
	popwindow = window.open(url,'newwindow', attribute);
}

function page_showExtendInfo(){
	document.getElementById("extendinfo").style.display="block";
	document.getElementById("showbutton").style.display="none";
	document.getElementById("hiddenbutton").style.display="block";
}

function page_hiddenExtendInfo(){
	document.getElementById("showbutton").style.display="block";
	document.getElementById("extendinfo").style.display="none";
	document.getElementById("hiddenbutton").style.display="none";
}

function page_checkNullStr(obj){
	var str=obj.value;
	str = ( str || "" ).replace(/^\s+|\s+$/g, "");
	str = ( str || "" ).replace(/^\　+|\　+$/g, "");
	obj.value=str;
}

function page_selectProduct(){
    var hospitalid=document.cform.hospitalid.value;
	if(popwindow!=null) popwindow.close();
	<%if(!(strDisplayFlag).equals("view")){%>
	url = '<%=contextPath %>/phap/masterdata/erm/HospitalPro.jsp?<%= OvalTools.randomURL() %>&hospitalid='+hospitalid;
    <%}else{ %>
    url = '<%=contextPath %>/phap/masterdata/erm/HospitalPro.jsp?<%= OvalTools.randomURL() %>&hospitalid='+hospitalid+'&displayflag=view';
    <%} %> 
    //url = '<%=contextPath %>/phap/masterdata/erm/HospitalPro.jsp?<%= OvalTools.randomURL() %>&hospitalid='+hospitalid;
    attribute = 'height=300, width=650,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes';
	popwindow = window.open(url,'newwindow', attribute);
}
function page_setOrg4(id,name,code)
{
  document.cform.countyorgid.value = id;
  document.cform.countyorgcode.value = code;  
  document.cform.countyorgname.value = name;
  var remote = window.open("","newwindow");
  if (remote != null)
    remote.close();
}

function page_selectProduct1(){
    var hospitalid=document.cform.hospitalid.value;
	if(popwindow!=null) popwindow.close();
	<%if((strDisplayFlag).equals("view")){%>
	 url = '<%=contextPath %>/zyl/masterdata/erm/DepartmentProDate.jsp?<%= OvalTools.randomURL() %>&hospitaldeptid='+hospitalid+'&displayflag=view';
	<%}else{ %>
	 url = '<%=contextPath %>/zyl/masterdata/erm/DepartmentProDate.jsp?<%= OvalTools.randomURL() %>&hospitaldeptid='+hospitalid;
	<%} %> 
    //url = '<%=contextPath %>/zyl/masterdata/erm/DepartmentProDate.jsp?<%= OvalTools.randomURL() %>&hospitaldeptid='+hospitalid;
    attribute = 'height=300, width=650,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes';
	popwindow = window.open(url,'newwindow', attribute);
}

function getorgpdgroup()
{
	if (document.cform.hospitalid==null||(document.cform.hospitalid.value==null)||(document.cform.hospitalid.value.length <= 0)||(document.cform.hospitalid.value=="null")){
    	alert("<%=message.getMessageDesc("SAVE_INFO_FIRST")%>");
        return;
    }
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=contextPath%>/masterdata/ogm/ZylOrgpdGroup.jsp?<%= OvalTools.randomURL() %>&displayflag=<%=strDisplayFlag%>&languagecode=<%= strLanguageCode %>&datacategory=11&orgid='+document.cform.hospitalid.value,null, 'height=300, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

function getorgpdgroup1()
{
	if (document.cform.hospitalid==null||(document.cform.hospitalid.value==null)||(document.cform.hospitalid.value.length <= 0)||(document.cform.hospitalid.value=="null")){
    	alert("<%=message.getMessageDesc("SAVE_INFO_FIRST")%>");
        return;
    }
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=contextPath%>/masterdata/ogm/ZylOrgpdGroup.jsp?<%= OvalTools.randomURL() %>&displayflag=<%=strDisplayFlag%>&languagecode=<%= strLanguageCode %>&datacategory=19&orgid='+document.cform.hospitalid.value,null, 'height=300, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

function getopenaccount()
{
	if (document.cform.hospitalid==null||(document.cform.hospitalid.value==null)||(document.cform.hospitalid.value.length <= 0)||(document.cform.hospitalid.value=="null")){
    	alert("<%=message.getMessageDesc("SAVE_INFO_FIRST")%>");
        return;
    }
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=contextPath%>/phap/masterdata/erm/ZylOpenAccount.jsp?<%= OvalTools.randomURL() %>&orgid='+document.cform.hospitalid.value,null, 'height=300, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}
</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td class="summary_top"></td>
  </tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" >
<form id="pageform" name="cform" method="post" action="<%=contextPath %>/Dispatcher" target="_self">
<input type="hidden" name="pagename" value="p_hospitaldetail">
<custom:hidden property="actionname"/>
<custom:hidden property="hospitalid" name="hospitaldetail"/>
<custom:hidden property="infoid" name="hospitaldetail"/>
<%
	boolean codereadonly = false;
	HashMap hospitaldetail = (HashMap)pageContext.getAttribute("hospitaldetail");
	String hospitalcode = null;
	if(pageContext.getAttribute("hospitaldetail") != null ){
		codereadonly = true;
		hospitalcode = (String)hospitaldetail.get("hospitalcode");
	}
	
%>
  <tr> 
    <td valign="top"> 
        <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
          <%if(!(strDisplayFlag).equals("view")){%>
		  <tr>
			 <td colspan="4" class="td_right"><a onclick="page_save()"><custom:button
			  type="2" label="L_Save" imgsrc="save_btn.gif" border="0" /></a></td>
		  </tr>
		  <%}%>
          <%//if(!(strDisplayFlag).equals("view")){%>
          <!--<tr>
            <td colspan="4" class="td_right"><a onclick="page_done();"><custom:button type="2" label="L_Save" imgsrc="save_btn.gif" border="0"/></a></td>
          </tr>
          --><%//} %>
          <tr> 	 
            <%if(hospitalcode!=null){%>
            <td class="td-text" width="15%"><%=label.getLabelName("L_HospitalCode1") + label.getLabelName("L_Colon") %></td>
            <td width="35%"><custom:text property="hospitalcode" name="hospitaldetail" readonly="true" style="border:0;width:100%" size="20"/></td>
            <%}else{ %>
            <td class="td-text" width="15%"><%=label.getLabelName("L_HospitalCode1") + label.getLabelName("L_Colon") %></td>
            <!-- <td width="35%"><custom:text property="hospitalcode" name="hospitaldetail" size="20" onchange="page_checkNullStr(this)"/></td> -->
            <td width="35%"><custom:text property="hospitalcode" name="hospitaldetail" style="border:0;width:100%" readonly="true"/></td>
            <%} %>
            <td class="td-text" width="15%"><%= label.getLabelName("L_YiLingCode") + label.getLabelName("L_Colon") %></td>
            <td width="35%"><custom:text property="referenceorgcode" name="hospitaldetail" style="border:0;width:100%" readonly="true"/></td>
          </tr>
          <tr>
            <td class="need" ><%= label.getLabelName("L_Hospital") + label.getLabelName("L_Name") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="hospitalname" name="hospitaldetail" command="notnull" label="L_HospitalName" onchange="page_checkNullStr(this)"/></td>
            <td class="td-text"><%= label.getLabelName("L_HospitalShortName")  + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="shortname" name="hospitaldetail" label="L_HospitalShortName" onchange="page_checkNullStr(this)"/></td>
          </tr>
          <tr>
          	<td class="td-text" ><%= label.getLabelName("L_ParentOrgShortName") + label.getLabelName("L_Colon") %></td>
            <td>
            	<%if((strDisplayFlag).equals("view")){%>
            	<custom:text property="parentorgcode" name="hospitaldetail"  size="10"></custom:text>
            	<%}else{ %>
            	<custom:text property="parentorgcode" name="hospitaldetail" readonly="true" size="10"></custom:text>
            	<%} %>
            	<a onclick="popup('<%=contextPath %>/masterdata/ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&globalpccode=113','newwindow','height=250, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no')"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<%if((strDisplayFlag).equals("view")){%>
            	<custom:text property="parentorgname" name="hospitaldetail"  size="20"></custom:text>
            	<%}else{ %>
            	<custom:text property="parentorgname" name="hospitaldetail" readonly="true" size="20"></custom:text>
            	<%} %>
            </td>
            <custom:hidden property="parentorgid" name="hospitaldetail"></custom:hidden>
            <td class="need"><%= label.getLabelName("L_SCMRole") + label.getLabelName("L_Colon") %></td>
            <td><custom:selectdic dictType="GlobalPCCode" property="globalpccode" name="hospitaldetail"  value="113" disabled="true" command="notnull" label="L_SCMRole"/></td>
          </tr>
          <tr>
            <td class="need"><%=label.getLabelName("L_Business_Sales_Level") + label.getLabelName("L_Colon") %></td>
            <td>
              <%--<custom:selectdic dictType="YLHospitalLevel1" property="yllevel" name="hospitaldetail" defaultValue="------------" command="notnull" label="L_Business_Sales_Level" defaultValueCost=" " />--%>
              <%if((strDisplayFlag).equals("view")){%>
            	<a onclick="getorgpdgroup()" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
              <%}else{ %>
            	<custom:button type="3" label="L_Ln" value="*" border="0" onclick="getorgpdgroup()"/>
              <%} %>
            </td>
            <td class="need"><%= label.getLabelName("L_Yl_Level") + label.getLabelName("L_Colon") %></td>                
            <td><custom:selectdic dictType="YLHospitalLevel" property="yllevel1" name="hospitaldetail" defaultValue="-------------" command="notnull" label="L_Yl_Level"  defaultValueCost=" " /></td>
          </tr>
          <tr>
            <td class="need"><%=label.getLabelName("L_Potential_Level") + label.getLabelName("L_Colon") %></td>
            <td>
              <%if((strDisplayFlag).equals("view")){%>
            	<a onclick="getorgpdgroup1();" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
              <%}else{ %>
            	<custom:button type="3" label="L_Ln" value="*" border="0" onclick="getorgpdgroup1();"/>
              <%} %>
              <%--&nbsp;<!--<custom:selectdic dictType="YLHospitalLevel1" property="yllevel" name="hospitaldetail" defaultValue="------------" command="notnull" label="L_Potential_Level" defaultValueCost=" " />-->--%>
            </td>
            <!--  <td class="td-text"><%= label.getLabelName("L_IsLocked") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic dictType="YesOrNo" property="islocked" name="hospitaldetail" defaultValueCost=" " disabled="true" defaultValue="----" />
          	</td>
          	-->
          	<td class="need"><%= label.getLabelName("L_Status") + label.getLabelName("L_Colon") %></td>
            <td><custom:select optionsName="allstatus" optionValueKey="statusvalue" optionInnerTextKey="statusname" name="hospitaldetail" label="L_StatusName" property="status"  defaultValue="-------" command="notnull" /></td>
          </tr>
          <tr>
          	<%--<td class="need"><%= label.getLabelName("L_BusinessAreaName") + label.getLabelName("L_Colon") %></td>
            <td>
				<custom:hidden name="hospitaldetail" property="businessareaid"/>
				<%if((strDisplayFlag).equals("view")){%>
				<custom:write name="hospitaldetail" property="areaname" nbsp="true"/>
				<%}else{%>
				<custom:text name="hospitaldetail" property="areaname" command="notnull" label="L_BusinessAreaName" readonly="true"/>
				<%}%>
				<a onclick="popBusinessarea()"><custom:button type="3" value="*"/></a>
            </td>
          --%>
            <td class="need"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
            <td> 
            	<%if((strDisplayFlag).equals("view")){%>
            	<%--
            	<custom:text property="regioncode" name="hospitaldetail" command="notnull" label="L_Province" size="10" />
            	 --%>
            	
            	<%}else{ %>
            	<custom:text property="regioncode" name="hospitaldetail" command="notnull" label="L_Province" size="10" readonly="true"/>
            	<%} %>
            	<a onclick="javascript:page_selectProvince();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<%if((strDisplayFlag).equals("view")){%>
            	<custom:text property="regionname" name="hospitaldetail" size="20"/>
            	<%}else{ %>
            	<custom:text property="regionname" name="hospitaldetail" readonly="true" size="20"/>
            	<%} %>
            </td>
            <td class="need"><%= label.getLabelName("L_Country") + label.getLabelName("L_level") + label.getLabelName("L_Colon") %></td>
            <td><custom:selectdic dictType="HospitalLevel" property="hospitallevel" name="hospitaldetail" defaultValue="------------" label="L_CountryLevel"  defaultValueCost=" " command="notnull" /></td>
          </tr>
          <tr>
          	
          	<td class="need"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<%if((strDisplayFlag).equals("view")){%>
          		<%--
          		<custom:text property="citycode" name="hospitaldetail" command="" label="L_City" size="10"/>
          		 --%>
            	<%}else{ %>
            	<custom:text property="citycode" name="hospitaldetail" command="notnull" label="L_City" size="10" readonly="true"/>
            	<%} %>
            	<a onclick="javascript:page_selectCity('city',1);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<%if((strDisplayFlag).equals("view")){%>
            	<custom:text property="cityname" name="hospitaldetail"  size="20" />
            	<%}else{ %>
            	<custom:text property="cityname" name="hospitaldetail" readonly="true" size="20" command="notnull"/>
            	<%} %>
            </td>
            	<td class="need"><%= label.getLabelName("L_AccountInfo1") + label.getLabelName("L_Colon") %></td>
                <td>
                  <%--<custom:selectdic dictType="OpenCloseAccount" property="isopenaccount" name="hospitaldetail" label="L_AccountInfo1" command="notnull" defaultValueCost=" " defaultValue="--------------------"/>--%>
                  <%if((strDisplayFlag).equals("view")){%>
            	    <a onclick="getopenaccount();" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
                  <%}else{ %>
            	    <custom:button type="3" label="L_Ln" value="*" border="0" onclick="getopenaccount();"/>
                  <%} %>
                </td>
          </tr>
          <tr>
        	
          <%-- 
          <td class="need"><%= label.getLabelName("L_OperationCondition") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic dictType="HospitalOperationCondition" property="operationcondition" name="hospitaldetail" command="notnull" label="L_OperationCondition" defaultValue="------------"  defaultValueCost=" "/>
          	</td>
          --%>	
          	
           <td class="need"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td>
            	<%if((strDisplayFlag).equals("view")){%>
            	<%--
            	<custom:text property="countycode" name="hospitaldetail" command="" label="L_County" size="10"/>
            	 --%>
              	<%}else{ %>
              	<custom:text property="countycode" name="hospitaldetail"  label="L_YLCounty" size="10" readonly="true" command="notnull"/>
              	<%} %>
              	<a onclick="javascript:page_selectCity('county',2);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0" /></a>
              	<%if((strDisplayFlag).equals("view")){%>
              	<custom:text property="countyname" name="hospitaldetail" size="20" />
              	<%}else{ %>
              	<custom:text property="countyname" name="hospitaldetail" readonly="true" size="20" />
              	<%} %>
            </td>
			<td class="need"><%= label.getLabelName("L_YesOrNoPeiSong") + label.getLabelName("L_Colon") %></td>
            <td >
              <custom:selectdic dictType="YesOrNo" property="yesornodelivery" name="hospitaldetail" defaultValue="-------" defaultValueCost=" " label="L_YesOrNoPeiSong" command="notnull"></custom:selectdic>
            </td>
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_CountyArea") + label.getLabelName("L_Customer") + label.getLabelName("L_Colon") %></td>
            <td>
            <%if((strDisplayFlag).equals("view")){%>
              <custom:write property="countyorgcode" name="hospitaldetail" ></custom:write>
              <custom:write  property="countyorgname" name="hospitaldetail" ></custom:write>
            <%}else{ %>
            <custom:text property="countyorgcode" name="hospitaldetail" readonly="true" size="10"></custom:text>
            <a onclick="popup('<%=contextPath %>/masterdata/ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&globalpccode=116&flag=pchannel','newwindow','height=250, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no')"><custom:button  type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            <custom:text  property="countyorgname" name="hospitaldetail" readonly="true" size="20"></custom:text>
            <%} %>
              <custom:hidden property="countyorgid" name="hospitaldetail"/>
			</td>
			<td class="td-text"><%= label.getLabelName("L_ZipCode1") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="zipcode" name="hospitaldetail"/></td>
          </tr>
          <tr>
          	
          	<td class="td-text"><%= label.getLabelName("L_Filedate") + label.getLabelName("L_Colon") %></td>
          	<td>
				 &nbsp; <custom:write property="createdate" name="hospitaldetail" dataType="date" dataFormatName="dateformat"/>
          	</td>
          	<td class="td-text"><%= label.getLabelName("L_Updated") + label.getLabelName("L_Colon") %></td>
            <td>
               &nbsp;<custom:write property="datelastupdated" dataType="date" name="hospitaldetail" dataFormatName="dateformat" />
            </td>
			
          </tr>
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_OpeningDate") + label.getLabelName("L_Colon") %></td>
          	<td>
				<%if((strDisplayFlag).equals("view")){%>
				<custom:text property="developdate" name="hospitaldetail" dataType="date" dataFormatName="dateformat" size="20" label="L_OpeningDate" onfocus="c.show(this,'cform.developdate','yyyy-MM-dd')"/>
				<%}else{ %>
				<custom:text property="developdate" name="hospitaldetail" dataType="date" dataFormatName="dateformat" size="20" label="L_OpeningDate"  onfocus="c.show(this,'cform.developdate','yyyy-MM-dd')"/>	
				<%} %>
          	</td>
          	
          	
          	
          	
          	
          	
          	
          	<td class="td-text"><%= label.getLabelName("L_FirstStockDate") + label.getLabelName("L_Colon") %></td>
            <td><custom:text name="hospitaldetail" property="firststockdate" size="20" dataType="date" dataFormatName="dateformat" label="L_FirstStockDate" onfocus="c.show(this,'cform.firststockdate','yyyy-MM-dd')"/></td>	
          	
          </tr>
          <tr>
             <tr>
            <td class="need"><%= label.getLabelName("L_HospitalNature") + label.getLabelName("L_Colon") %></td>
            <td><custom:selectdic dictType="YLHospitalProperty1" property="property1" name="hospitaldetail" defaultValueCost=" " defaultValue="-----" command="notnull" label="L_HospitalNature"/></td>
            <td class="need"><%=label.getLabelName("L_Hospital") + label.getLabelName("L_FileType") + label.getLabelName("L_Colon") %></td>
            <td> <custom:selectdic dictType="HospitalType" property="hospitaltype" name="hospitaldetail" defaultValueCost=" "  defaultValue="-------" command="notnull" label="L_HospitalType"/></td>
          </tr>
          
            <td class="td-text"><%= label.getLabelName("L_SpecialDepartment") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:text property="specialdepartment" name="hospitaldetail" />
          	</td>
          	<td class="td-text"><%= label.getLabelName("L_ProdDevelopInfo") + label.getLabelName("L_Colon") %></td>
          	<td>
          	<%if((strDisplayFlag).equals("view")){%>
            <a  onclick="page_selectProduct1()" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
            <%}else{ %>
                <custom:button type="3" label="L_Asterisk" value="*" border="0" onclick="page_selectProduct1()"/>
           <%} %> 
          	</td>
          </tr>
          
       
          <%--
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_TerminalClass") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic dictType="TerminalClassType" property="attr3" name="hospitaldetail" defaultValue="-------------" defaultValueCost=" "></custom:selectdic>
          	</td>
           
         
          </tr>
          --%>
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_Fax") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="fax" name="hospitaldetail" /></td>		 
           	<td class="td-text"><%= label.getLabelName("L_URL") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:text property="url" name="hospitaldetail" />
            </td>	
          </tr>
          <tr>
            
          	<td class="td-text"><%= label.getLabelName("L_Email") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="email" name="hospitaldetail"/></td>
          	<td class="td-text"><%= label.getLabelName("L_Telephone") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="telephone" name="hospitaldetail"/></td>
          	
          </tr>
          <tr> 
          	
            <td class="td-text"><%= label.getLabelName("L_Address") + label.getLabelName("L_Colon") %></td>
            <td colspan="3">
               <custom:text name="hospitaldetail" property="address" size="100" label="L_Address"/>
            </td>
          </tr>
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_Comments") + label.getLabelName("L_Colon") %></td>
            <td colspan="3"> 
               <custom:text name="hospitaldetail" property="comments" size="100"/>
            </td>
          </tr>
        </table>
        <div id="showbutton" style="display:block">
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			  <tr>
				<td height="49" class="td_right">
					<a onclick="page_showExtendInfo()"><input type="button" class="button2" style="display:block" value="<%= label.getLabelName("L_ExtendedInformationDisplay") %>" style="width:100"></a>
				</td>
			  </tr>
		  </table>
		  </div>
		  <div id="hiddenbutton" style="display:none">
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			  <tr>
				<td height="49" class="td_right">
					<a onclick="page_hiddenExtendInfo()"><input type="button" class="button2" style="display:block" value="<%= label.getLabelName("L_HiddenExtensionInformation") %>" style="width:100"></a>
				</td>
			  </tr>
		  </table>
		  </div>
		  <div id="extendinfo" style="display:none">
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
          <tr> 
            <td colspan="4" class="deepblue-left"><img src="<%=contextPath %>/images/cn/quote.gif"><%= label.getLabelName("L_ExtendInfo") + label.getLabelName("L_Colon") %></td>
          </tr>
         
          <tr>
            
            <td class="td-text"><%= label.getLabelName("L_MarketShare") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="marketpercent" name="hospitaldetail" command="notnegative" dataType="number" label="L_MarketShare"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_HygieneDeptRanking") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="mohranking" name="hospitaldetail" command="notnegative" dataType="number" label="L_HygieneDeptRanking"/>
            </td>
		  </tr>
          
		  <tr> 
            
            
          	<td class="td-text" ><%= label.getLabelName("L_StockChanel") + label.getLabelName("L_Colon") %></td>
            <td>                       
            	<a onclick="page_selectPurchase()"><custom:button type="2" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            </td>
            <td class="td-text"><%= label.getLabelName("L_YearSumIncome") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="yearlyincome" name="hospitaldetail" command="notnegative" dataType="number" label="L_YearSumIncome"/>
            </td>
 		  </tr>
 		  <tr> 
            
          	
            <td class="td-text"><%= label.getLabelName("L_YearDrugPurchaseNumber") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="yearlypurchased" name="hospitaldetail" command="notnegative" dataType="number" label="L_YearDrugPurchaseNumber"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_ChineseDrugPurchaseNumber") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="yearlypurchasedcpm" name="hospitaldetail" command="notnegative" dataType="number" label="L_ChineseDrugPurchaseNumber"/>
            </td>
		  </tr>
		  <tr>
		  	
		  	<td class="td-text"><%= label.getLabelName("L_YearDrugIncome") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="drugincome" name="hospitaldetail" command="notnegative" dataType="number" label="L_YearDrugIncome"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_Yearclinicdrugcn") + label.getLabelName("L_Colon") %></td>
            <td> 
               <custom:text property="clinicdrugcn" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearclinicdrugcn"/>
            </td>
		  </tr>
		  <tr>
		  	
		  	<td class="td-text"><%= label.getLabelName("L_Yearinhospitaldrug") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="inhospitaldrug" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearinhospitaldrug"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_Yearclinicdrug") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="clinicdrug" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearclinicdrug"/>
            </td>
		  </tr>
		  <tr>
		  	
		  	<td class="td-text"><%= label.getLabelName("L_Yearinhospitaldrugcn") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="inhospitaldrugcn" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearinhospitaldrugcn"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_Yearcurenum") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="curenum" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearcurenum"/>
            </td>
		  </tr>
		  <tr>
		  	
		  	<td class="td-text"><%= label.getLabelName("L_Yearcliniccure") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="cliniccure" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearcliniccure"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_Yearmedicalcure") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="medicalcure" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearmedicalcure"/>
            </td>
		  </tr>
		  <tr>
		  	
		  	<td class="td-text"><%= label.getLabelName("L_Yearpediatriccure") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="pediatriccure" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearpediatriccure"/>
            </td>
           	<td class="td-text"><%= label.getLabelName("L_Yeartraditionalcure") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="traditionalcure" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yeartraditionalcure"/>
            </td>
		  </tr>
		  <tr>
		  	
		  	<td class="td-text"><%= label.getLabelName("L_Yearouthospital") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="outhospital" name="hospitaldetail" command="notnegative" dataType="number" label="L_Yearouthospital"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_DayCureNumber") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="dailyclinicalpatients" name="hospitaldetail" command="notnegative" dataType="number" label="L_DayCureNumber"/>
            </td>
		  </tr>
          <tr> 
            
            <td class="td-text"><%= label.getLabelName("L_DoctorNumber") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="doctornum" name="hospitaldetail" command="notnegative" dataType="number" label="L_DoctorNumber"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_BedNumber") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="bunks" name="hospitaldetail" command="notnegative" dataType="number" label="L_BedNumber"/>
            </td>
		  </tr>
		  
          <tr> 
            
             <td class="td-text"><%= label.getLabelName("L_CureProtectCondition") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:selectdic dictType="MedicalInsurance"  property="medicalinsurance" name="hospitaldetail" label="L_CureProtectCondition" defaultValueCost=" "/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_Firstfiveprod") + label.getLabelName("L_Colon") %></td>
            <td > 
               <!--<custom:text property="firstfiveprod" name="hospitaldetail" label="L_Firstfiveprod"/>-->
            <%if((strDisplayFlag).equals("view")){%>
            <a  onclick="page_selectProduct()" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
            <%}else{ %>
                <custom:button type="3" label="L_Asterisk" value="*" border="0" onclick="page_selectProduct()"/>
           <%} %> 
            </td>
            
		  </tr>
          <tr> 
           
            
            <td class="td-text"><%= label.getLabelName("L_ReceiptMan") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="consigner" name="hospitaldetail"/>
            </td>
            <td class="td-text"><%=label.getLabelName("L_ReceiptMan") + label.getLabelName("L_Telephone") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="consignerphone" name="hospitaldetail"/>
            </td>
		  </tr>
          <tr> 
            
            
            <td class="td-text"><%= label.getLabelName("L_RecieverAddress") + label.getLabelName("L_Colon") %></td>
            <td colspan="3"> 
               <custom:text property="consigneraddr" name="hospitaldetail" size="100"/>
            </td>
          </tr>
		  <tr> 
            <td colspan="4" class="deepblue-left"><img src="<%=contextPath %>/images/cn/quote.gif"><%= label.getLabelName("L_OrgRegistrationInfo")%></td>	
          </tr>
          <tr> 
            <td class="td-text" width="20%"><%= label.getLabelName("L_CorporatePerson") + label.getLabelName("L_Colon") %></td>
            <td width="30%"> 
               <custom:text property="corporateperson" name="hospitaldetail" label="corporateperson"/>
            </td>
            <td class="td-text" width="20%"><%= label.getLabelName("L_OrgOpenDate") + label.getLabelName("L_Colon") %></td>
            <td width="30%">
				<%if((strDisplayFlag).equals("view")){%>
				<custom:text property="opendate" name="hospitaldetail" dataType="date" dataFormatName="dateformat" size="20"  onfocus="c.show(this,'cform.opendate','yyyy-MM-dd')"/>
				<%}else{%>
				<custom:text property="opendate" name="hospitaldetail" dataType="date" dataFormatName="dateformat" size="20" readonly="true" onfocus="c.show(this,'cform.opendate','yyyy-MM-dd')"/>
				<%}%>

            </td>
          </tr>
          <tr>        
            <td class="td-text"><%= label.getLabelName("L_CorpTypeName") + label.getLabelName("L_Colon")%></td>
            <td><custom:select style="width:100" optionsName="allcorptype" optionValueKey="value" optionInnerTextKey="valuename" name="hospitaldetail" property="corporationtype" defaultValue="-----"/></td>
            <td class="td-text"><%= label.getLabelName("L_RegisterFund") + label.getLabelName("L_Colon")%></td>
            <td ><custom:text property="registerfund" name="hospitaldetail" label="L_RegisterFund"
             command="notnegative" dataType="number" dataFormat="##.00"/>&nbsp;<%= label.getLabelName("L_10k")%>
            </td>
          </tr>
            <tr> 
            
            <td class="td-text"><%= label.getLabelName("L_Organization_Code") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="organizecode" name="hospitaldetail"  label="L_Organization_Code"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_President") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="manager" name="hospitaldetail"  label="L_President"/>
            </td>
		  </tr>
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_LicenseNumber") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="licenceno" name="hospitaldetail"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_BankName") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="accountbank" name="hospitaldetail"/>
            </td>
          </tr>  
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_BankAccountNo") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="accountno" name="hospitaldetail"/>
            </td>
            <td class="td-text"><%= label.getLabelName("L_IncrementValueDutyRegisterNO") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="taxno" name="hospitaldetail"/>
            </td>
          </tr>  
          <tr> 
            <!--  <td class="td-text"><%= label.getLabelName("L_Remark") + label.getLabelName("L_Colon") %></td>
            <td ><custom:text property="comments" name="hospitaldetail"/></td>-->
            <td class="td-text"><%=label.getLabelName("L_Register") + label.getLabelName("L_Address") + label.getLabelName("L_Colon") %></td>
            <td > 
               <custom:text property="registeraddress" name="hospitaldetail"/>
            </td>
            <td class="td-text">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
		</div>
      </td>
  </tr>
  <tr>
    <td class="summary_top"></td>
  </tr>
</form>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td class="td_center">
		<a onclick="__back()"><custom:button type="2" label="L_Back" imgsrc="delete.gif" border="0" style="width:60"/></a>
		</td>
	</tr>
</table>
</body>
<script>
  var list=document.getElementsByTagName("input");
  m=list.length
  list[m-1].style.display='none';
</script>
</html>